package com.bsoft.gol.hcs.visitrecord.entity;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 门诊、住院记录诊断
 * Created by ChenJij on 2020/9/4.
 */
@Entity
@Table(name = "vr_visit_diagnosis")
public class VrVisitDiagnosis implements Serializable {
    private String diagnosticRecordId;
    private String businessType;
    private String businessId;
    private String visitNo;
    private String patientId;
    private String diagnoseId;
    private String diagnosisServiceType;
    private String diagnosisType;
    private String groupNumber;
    private String mainDiagnosisMark;
    private String diseasesCode;
    private String diseasesName;
    private String describeDiagnosis;
    private String diagnosisDoctorId;
    private Date diagnosisTime;
    private String voidFlag;
    private String submitFlag;
    private String diagnosisFlag;
    private Date confirmDiagnosisTime;
    private String businessIdentification;
    private String voidDoctorId;
    private Date voidTime;
    private String deleteFlag;

    @Id
    @Column(name = "diagnostic_record_id")
    public String getDiagnosticRecordId() {
        return diagnosticRecordId;
    }

    public void setDiagnosticRecordId(String diagnosticRecordId) {
        this.diagnosticRecordId = diagnosticRecordId;
    }

    @Basic
    @Column(name = "business_type")
    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    @Basic
    @Column(name = "business_id")
    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    @Basic
    @Column(name = "visit_no")
    public String getVisitNo() {
        return visitNo;
    }

    public void setVisitNo(String visitNo) {
        this.visitNo = visitNo;
    }

    @Basic
    @Column(name = "patient_id")
    public String getPatientId() {
        return patientId;
    }

    public void setPatientId(String patientId) {
        this.patientId = patientId;
    }

    @Basic
    @Column(name = "diagnosis_service_type")
    public String getDiagnosisServiceType() {
        return diagnosisServiceType;
    }

    public void setDiagnosisServiceType(String diagnosisServiceType) {
        this.diagnosisServiceType = diagnosisServiceType;
    }
    @Basic
    @Column(name = "diagnose_id")
    public String getDiagnoseId() {
        return diagnoseId;
    }

    public void setDiagnoseId(String diagnoseId) {
        this.diagnoseId = diagnoseId;
    }

    @Basic
    @Column(name = "diagnosis_type")
    public String getDiagnosisType() {
        return diagnosisType;
    }

    public void setDiagnosisType(String diagnosisType) {
        this.diagnosisType = diagnosisType;
    }

    @Basic
    @Column(name = "group_number")
    public String getGroupNumber() {
        return groupNumber;
    }

    public void setGroupNumber(String groupNumber) {
        this.groupNumber = groupNumber;
    }

    @Basic
    @Column(name = "main_diagnosis_mark")
    public String getMainDiagnosisMark() {
        return mainDiagnosisMark;
    }

    public void setMainDiagnosisMark(String mainDiagnosisMark) {
        this.mainDiagnosisMark = mainDiagnosisMark;
    }

    @Basic
    @Column(name = "diseases_code")
    public String getDiseasesCode() {
        return diseasesCode;
    }

    public void setDiseasesCode(String diseasesCode) {
        this.diseasesCode = diseasesCode;
    }

    @Basic
    @Column(name = "diseases_name")
    public String getDiseasesName() {
        return diseasesName;
    }

    public void setDiseasesName(String diseasesName) {
        this.diseasesName = diseasesName;
    }

    @Basic
    @Column(name = "describe_diagnosis")
    public String getDescribeDiagnosis() {
        return describeDiagnosis;
    }

    public void setDescribeDiagnosis(String describeDiagnosis) {
        this.describeDiagnosis = describeDiagnosis;
    }

    @Basic
    @Column(name = "diagnosis_doctor_id")
    public String getDiagnosisDoctorId() {
        return diagnosisDoctorId;
    }

    public void setDiagnosisDoctorId(String diagnosisDoctorId) {
        this.diagnosisDoctorId = diagnosisDoctorId;
    }

    @Basic
    @Column(name = "diagnosis_time")
    public Date getDiagnosisTime() {
        return diagnosisTime;
    }

    public void setDiagnosisTime(Date diagnosisTime) {
        this.diagnosisTime = diagnosisTime;
    }

    @Basic
    @Column(name = "void_flag")
    public String getVoidFlag() {
        return voidFlag;
    }

    public void setVoidFlag(String voidFlag) {
        this.voidFlag = voidFlag;
    }

    @Basic
    @Column(name = "submit_flag")
    public String getSubmitFlag() {
        return submitFlag;
    }

    public void setSubmitFlag(String submitFlag) {
        this.submitFlag = submitFlag;
    }

    @Basic
    @Column(name = "diagnosis_flag")
    public String getDiagnosisFlag() {
        return diagnosisFlag;
    }

    public void setDiagnosisFlag(String diagnosisFlag) {
        this.diagnosisFlag = diagnosisFlag;
    }

    @Basic
    @Column(name = "confirm_diagnosis_time")
    public Date getConfirmDiagnosisTime() {
        return confirmDiagnosisTime;
    }

    public void setConfirmDiagnosisTime(Date confirmDiagnosisTime) {
        this.confirmDiagnosisTime = confirmDiagnosisTime;
    }

    @Basic
    @Column(name = "business_identification")
    public String getBusinessIdentification() {
        return businessIdentification;
    }

    public void setBusinessIdentification(String businessIdentification) {
        this.businessIdentification = businessIdentification;
    }

    @Basic
    @Column(name = "void_doctor_id")
    public String getVoidDoctorId() {
        return voidDoctorId;
    }

    public void setVoidDoctorId(String voidDoctorId) {
        this.voidDoctorId = voidDoctorId;
    }

    @Basic
    @Column(name = "void_time")
    public Date getVoidTime() {
        return voidTime;
    }

    public void setVoidTime(Date voidTime) {
        this.voidTime = voidTime;
    }

    @Basic
    @Column(name = "delete_flag")
    public String getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(String deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof VrVisitDiagnosis)) {
            return false;
        }

        VrVisitDiagnosis that = (VrVisitDiagnosis) o;

        if (diagnosticRecordId != null ? !diagnosticRecordId.equals(that.diagnosticRecordId) : that.diagnosticRecordId != null) {
            return false;
        }
        if (businessType != null ? !businessType.equals(that.businessType) : that.businessType != null) {
            return false;
        }
        if (businessId != null ? !businessId.equals(that.businessId) : that.businessId != null) {
            return false;
        }
        if (visitNo != null ? !visitNo.equals(that.visitNo) : that.visitNo != null) {
            return false;
        }
        if (patientId != null ? !patientId.equals(that.patientId) : that.patientId != null) {
            return false;
        }
        if (diagnosisServiceType != null ? !diagnosisServiceType.equals(that.diagnosisServiceType) : that.diagnosisServiceType != null) {
            return false;
        }
        if (diagnosisType != null ? !diagnosisType.equals(that.diagnosisType) : that.diagnosisType != null) {
            return false;
        }
        if (groupNumber != null ? !groupNumber.equals(that.groupNumber) : that.groupNumber != null) {
            return false;
        }
        if (mainDiagnosisMark != null ? !mainDiagnosisMark.equals(that.mainDiagnosisMark) : that.mainDiagnosisMark != null) {
            return false;
        }
        if (diseasesCode != null ? !diseasesCode.equals(that.diseasesCode) : that.diseasesCode != null) {
            return false;
        }
        if (diseasesName != null ? !diseasesName.equals(that.diseasesName) : that.diseasesName != null) {
            return false;
        }
        if (describeDiagnosis != null ? !describeDiagnosis.equals(that.describeDiagnosis) : that.describeDiagnosis != null) {
            return false;
        }
        if (diagnosisDoctorId != null ? !diagnosisDoctorId.equals(that.diagnosisDoctorId) : that.diagnosisDoctorId != null) {
            return false;
        }
        if (diagnosisTime != null ? !diagnosisTime.equals(that.diagnosisTime) : that.diagnosisTime != null) {
            return false;
        }
        if (voidFlag != null ? !voidFlag.equals(that.voidFlag) : that.voidFlag != null) {
            return false;
        }
        if (submitFlag != null ? !submitFlag.equals(that.submitFlag) : that.submitFlag != null) {
            return false;
        }
        if (diagnosisFlag != null ? !diagnosisFlag.equals(that.diagnosisFlag) : that.diagnosisFlag != null) {
            return false;
        }
        if (confirmDiagnosisTime != null ? !confirmDiagnosisTime.equals(that.confirmDiagnosisTime) : that.confirmDiagnosisTime != null) {
            return false;
        }
        if (businessIdentification != null ? !businessIdentification.equals(that.businessIdentification) : that.businessIdentification != null) {
            return false;
        }
        if (voidDoctorId != null ? !voidDoctorId.equals(that.voidDoctorId) : that.voidDoctorId != null) {
            return false;
        }
        if (deleteFlag != null ? !deleteFlag.equals(that.deleteFlag) : that.deleteFlag != null) {
            return false;
        }
        return voidTime != null ? voidTime.equals(that.voidTime) : that.voidTime == null;
    }

    @Override
    public int hashCode() {
        int result = diagnosticRecordId != null ? diagnosticRecordId.hashCode() : 0;
        result = 31 * result + (businessType != null ? businessType.hashCode() : 0);
        result = 31 * result + (businessId != null ? businessId.hashCode() : 0);
        result = 31 * result + (visitNo != null ? visitNo.hashCode() : 0);
        result = 31 * result + (patientId != null ? patientId.hashCode() : 0);
        result = 31 * result + (diagnosisServiceType != null ? diagnosisServiceType.hashCode() : 0);
        result = 31 * result + (diagnosisType != null ? diagnosisType.hashCode() : 0);
        result = 31 * result + (groupNumber != null ? groupNumber.hashCode() : 0);
        result = 31 * result + (mainDiagnosisMark != null ? mainDiagnosisMark.hashCode() : 0);
        result = 31 * result + (diseasesCode != null ? diseasesCode.hashCode() : 0);
        result = 31 * result + (diseasesName != null ? diseasesName.hashCode() : 0);
        result = 31 * result + (describeDiagnosis != null ? describeDiagnosis.hashCode() : 0);
        result = 31 * result + (diagnosisDoctorId != null ? diagnosisDoctorId.hashCode() : 0);
        result = 31 * result + (diagnosisTime != null ? diagnosisTime.hashCode() : 0);
        result = 31 * result + (voidFlag != null ? voidFlag.hashCode() : 0);
        result = 31 * result + (submitFlag != null ? submitFlag.hashCode() : 0);
        result = 31 * result + (diagnosisFlag != null ? diagnosisFlag.hashCode() : 0);
        result = 31 * result + (confirmDiagnosisTime != null ? confirmDiagnosisTime.hashCode() : 0);
        result = 31 * result + (businessIdentification != null ? businessIdentification.hashCode() : 0);
        result = 31 * result + (voidDoctorId != null ? voidDoctorId.hashCode() : 0);
        result = 31 * result + (voidTime != null ? voidTime.hashCode() : 0);
        result = 31 * result + (deleteFlag != null ? deleteFlag.hashCode() : 0);
        return result;
    }
}